import src.mypkg.mylib as mylib

y = mylib.func1()
print(y)

y = mylib.func2()
print(y)

y = mylib.func3(45)
print(y)

y = mylib.func3(x=45)
print(y)

y = mylib.func4(48)
print(y)

y = mylib.func4(x=49)
print(y)

y = mylib.func4()
print(y)

print(mylib.func5(10, 5,"add"))
print(mylib.func5(operation="add", b=5, a=10))
print(mylib.func5(10, 5))
print(mylib.func5(10, 5, "subtract"))


print(mylib.func6(10, 5, "add"))

try:
    print(mylib.func7(10, 5, "add"))
except TypeError as e:
    print(e)

print(mylib.func7(10, 5, operation="add"))

print(mylib.func8(4, 8, 18, 5))
print(mylib.func8())

mylib.func9(name="Alice", age=25, city="New York")
mylib.func9()

# 使用元组解包
args_tuple = (1, 2)
mylib.func10(*args_tuple)  # 等同于 func10(1, 2)

# 使用列表解包
args_list = [3, 4]
mylib.func10(*args_list, c=200)  # 等同于 func10(3, 4, c=200)

# 使用字典解包
kwargs_dict = {"y": 100, "z": 200}
mylib.func11(1, **kwargs_dict)  # 等同于 func11(1, y=100, z=200)

mylib.func12(1, 2, 3)
mylib.func12("a", 2, 3)